package com.itheima.service;

import com.itheima.entity.PageResult;
import com.itheima.entity.QueryPageBean;
import com.itheima.pojo.Role;

import java.util.List;

/**
 * @version 1.0
 * @auther ljw
 * @date 2021/6/29 18:42
 */
public interface RoleService {

    List<Role> findAll();

    void add(Role role, Integer[] permissionIds, Integer[] menuIds);

    PageResult pageQuery(QueryPageBean queryPageBean);

    Role findById(Integer id);

    List<Integer> findPermissionIdsByUserId(Integer id);

    List<Integer> findMenuIdsByUserId(Integer id);

    void edit(Role role, Integer[] permissionIds, Integer[] menuIds);

    void delete(Integer id);

    void setRoleAndPermission(Integer roleId, Integer[] permissionIds);

    void setRoleAndMenu(Integer roleId, Integer[] menuIds);
}
